<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:https="http://www.w3.org/1999/xhtml">
<head th:fragment="headFragment">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="./static/css/me.css" th:href="@{/css/me.css}">
    <link rel="stylesheet" href="../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}">
    <!--引入页面排版CSS-->
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <!--引入动画插件CSS-->
    <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}">
    <style th:fragment="styless">
        #yls1 {
            background-image: url("../static/images/221652-16293826128665.jpg");
        }
    </style>
</head>
<body>

<!--导航-->
<nav class="ui inverted attached segment m-padded-tb-mini">
    <div class="ui container" id="yls1" th:fragment="navFragment(n)">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">
                <p align="center" th:text="${session.sessionUser.nickName}"
                   th:if="${not #strings.isEmpty(session.sessionUser.nickName)}">
                <p/></h2>
            <a th:href="@{/nav/index}" class="m-item item m-mobile-hide"
               th:classappend="${n==1} ? 'active m-item item m-mobile-hide'"><i class="idea icon"></i>首页</a>
            <a th:href="@{/nav/types}" class="m-item item m-mobile-hide"
               th:classappend="${n==2} ? 'active m-item item m-mobile-hide'"><i class="idea icon"></i>分类</a>
            <a th:href="@{/nav/tages}" class="m-item item m-mobile-hide"
               th:classappend="${n==3} ? 'active m-item item m-mobile-hide'"><i class="tags icon"></i>标签</a>
            <a th:href="@{/nav/archives}" class="m-item item m-mobile-hide"
               th:classappend="${n==4} ? 'active m-item item m-mobile-hide'"><i class="clone icon"></i>归档</a>
            <a th:href="@{/nav/about}" class="m-item item m-mobile-hide"
               th:classappend="${n==5} ? 'active m-item item m-mobile-hide'"><i class="info icon"></i>关于我</a>
            <div class="right m-item item m-mobile-hide">
                <div class="ui icon inverted transparent input m-margin-tb-tiny">
                    <input type="text" placeholder="Search......">
                    <i class="search link icon"></i>
                </div>
            </div>
            <div class="right m-item m-mobile-hide menu">
                <div class="ui dropdown m-item item" id="alreadyLogin" th:unless="${session.sessionUser.nickName == null}">
                    <div class="text">
                        <img src="https://unsplash.it/100/100?image=1010" alt="頭像" class="ui avatar image"> <span
                            id="sessionTag"
                            th:text="${session.sessionUser.nickName}"></span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a  th:href="@{/input/list}" class="item">写点什么？</a>
                    </div>
                </div>
                <div class="ui dropdown m-item item" id="needLogin" th:unless="${session.sessionUser.nickName != null}">
                    <div class="menu">
                        <a th:href="@{/}" class="item">登录</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--底部footer-->
<footer th:fragment="footerFragment" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}" class="ui rounded image"
                             alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list">
                        <a href="#" target="_blank" class="item m-text-thin">用户故事（User Story）</a>
                        <!--/*-->
                        <a href="#" class="item m-text-thin">用户故事（User Story）</a>
                        <a href="#" class="item m-text-thin">用户故事（User Story）</a>
                        <!--*/-->
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item m-text-thin">Email：2206981924@qq.com</a>
                    <a href="#" class="item m-text-thin">QQ：2206981924</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">Blog</h4>
                <p class="m-text-thin m-text-spaced m-opacity-mini">一个学习小博客...</p>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2020 - <span
                th:text="${#dates.year(#dates.createNow())}">2021</span> JH Designed by JH</p>
    </div>
</footer>
<th:block th:fragment="scriptFragment">

    <script type="text/javascript">

        $('.menu.toggle').click(function() {
            $('.m-item').toggleClass('m-mobile-hide');
        });
        $('.ui.dropdown').dropdown({
            on: 'hover'
        });

    </script>
</th:block>
</body>
</html>